import { Request, Response } from 'express';

// mock tableListDataSource
const dataSource: any[] = [];

for (let i = 0; i < 10; i += 1) {
  dataSource.push({
    key: i,
    id: 123456 + i,
    expCode: 'DH123456',
    outOrderId: 123 + i,
    consigneePhone: '13885093094',
    courierPhone: '13612359987',
    courierName: '小新',
    transhipUser: '小强',
    inTime: '2020-1-1 12:12:12',
    outTime: '2020-2-2 12:12:12',
    payment: 10,
    statusName: '正常',
    status: 10101,
  });
}

function getBatchDetail(req: Request, res: Response, u: string) {
  const result = {
    code: 0,
    message: 'success',
    body: {
      count: 56,
      list: dataSource,
    },
  };

  return res.json(result);
}

export default {
  'GET /batch/detail': getBatchDetail,
};
